/**
 * Created by Administrator on 2018/11/3.
 */
var Companies = require('../models/companies');
var Jobs = require("../models/jobs");
/**
 * 公司列表
 */

module.exports = function (data, response) {
  const findStr = {
    _id: data._id
  }

  Companies.findOne(findStr).then(function (res) {

    Jobs.find({
      company: res.name
    }).then(function (res) {
      response.json(res);
    });
  })

}
